import React, { FC, useReducer } from "react"
import reducer from "./reducer"
import initialState from "./store"

const List: FC = () => {
  const [state] = useReducer(reducer, initialState)
  return (
    <ul>
      {state.map(todo => (<li key={todo.id}>{todo.title</li>))}
    </ul>
  )
}

export default List
